home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet Web Designer 86 / PIWD86.iso / pc / contents / dreamweaver / software / dwmx2004.exe / Disk1 / data1.cab / Configuration_En / Commands / Variables Variable.js < prev    next >
Encoding:
JavaScript  |  2003-09-05  |  783 b   |  30 lines

  1. // Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved.
  2.  
  3. //*************** GLOBALS VARS *****************
  4.  
  5. var helpDoc         = MM.HELP_ssVariablesVariable;
  6.  
  7. //******************* API **********************
  8.  
  9. function commandButtons(){
  10.   return new Array(MM.BTN_OK,"okClicked()",MM.BTN_Cancel,"window.close()",MM.BTN_Help,"displayHelp()");
  11. }
  12.  
  13. //***************** LOCAL FUNCTIONS  ******************
  14.  
  15. function okClicked(){
  16.   var nameObj = document.forms[0].theName;
  17.  
  18.   if (nameObj.value) {
  19.     if (IsValidVarName(nameObj.value)) {
  20.       MM.VariablesContents = nameObj.value;
  21.       MM.retVal = "OK";
  22.       window.close();
  23.     } else {
  24.       alert(nameObj.value + " " + MM.MSG_InvalidParamName);
  25.     }
  26.   } else {
  27.     alert(MM.MSG_NoName);
  28.   }
  29. }
  30.